Skip to content

Fix sync.sh --validate to respect {{#if}} conditionals#83

Merged
sebastientaggart merged 1 commit into
devfrom
feature/validate-respects-conditionals
Apr 9, 2026
Merged

Fix sync.sh --validate to respect {{#if}} conditionals#83
sebastientaggart merged 1 commit into
devfrom
feature/validate-respects-conditionals

Conversation

@sebastientaggart

Copy link
Copy Markdown
Member

validate_placeholders now calls apply_conditionals before scanning with find_unresolved, matching the normal write path. Placeholders that only appear inside stripped {{#if KEY}}...{{/if}} blocks are no longer reported as undefined, restoring the usual preflight contract ("validate passes ⇒ sync will succeed").

Issue #78

@sebastientaggart

Copy link
Copy Markdown
Member Author

Review Summary

Verdict: APPROVE

Findings

  • [NOTE] The fix correctly aligns validate_placeholders with the main sync path (line 281), which already strips conditional blocks before substitution; placeholders inside falsy {{#if}} blocks are no longer falsely reported as missing.
  • [NOTE] Applying apply_conditionals to the frontmatter description is consistent with the body handling, though descriptions rarely contain conditionals in practice.

@sebastientaggart
sebastientaggart merged commit 2881c56 into dev Apr 9, 2026
2 checks passed
@sebastientaggart
sebastientaggart deleted the feature/validate-respects-conditionals branch April 9, 2026 22:37
This was referenced Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant